﻿using Eassets.Data.Asset;
using Eassets.Layered.Domain.Asset;
using System.Collections.ObjectModel;

namespace Eassets.Service.Asset
{
    public class AssetRevaluationDetailsService
    {
        AssetRevaluationDetailsData assetRevaluationDetailsdata = new AssetRevaluationDetailsData();

        /// <summary>
        /// Inserts assetRevaluationDetails.
        /// </summary>
        /// <param name="assetRevaluationDetails"></param>
        public void AddAssetRevaluationDetails(AssetRevaluationDetails assetRevaluationDetails)
        {
            if (assetRevaluationDetails != null)
            {
                assetRevaluationDetailsdata.AddAssetRevaluationDetails(assetRevaluationDetails);
            }
        }

        /// <summary>
        /// Updates assetRevaluationDetails.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ModifyAssetRevaluationDetails(AssetRevaluationDetails assetRevaluationDetails)
        {
            if (assetRevaluationDetails != null)
            {
                assetRevaluationDetailsdata.ModifyAssetRevaluationDetails(assetRevaluationDetails);
            }
        }

        /// <summary>
        ///  GetbyId assetRevaluationDetails.
        /// </summary>
        /// <param name="assetRevaluationDetailsId"></param>
        /// <returns></returns>
        public AssetRevaluationDetails GetByIdAssetRevaluationDetails(long assetRevaluationDetailsId)
        {
            return assetRevaluationDetailsdata.GetByIdAssetRevaluationDetails(assetRevaluationDetailsId);
        }

        /// <summary>
        /// GetAll assetRevaluationDetails.
        /// </summary>
        /// <returns></returns>
        public Collection<AssetRevaluationDetails> GetAllAssetRevaluationDetails()
        {
            return assetRevaluationDetailsdata.GetAllAssetRevaluationDetails();
        }

        public Collection<AssetItemDetails> GetFixedAssetItemDetailsByAssetId(long AssetId)
        {
            return assetRevaluationDetailsdata.GetFixedAssetItemDetailsByAssetId(AssetId);
        }
    }
}
